package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.PointAlarmHistoryMapper;
import com.ruoyi.yanjing.domain.PointAlarmHistory;
import com.ruoyi.yanjing.service.IPointAlarmHistoryService;

/**
 * 监测点位历史告警信息Service业务层处理
 * 
 * @author whz
 * @date 2024-11-19
 */
@Service
public class PointAlarmHistoryServiceImpl implements IPointAlarmHistoryService 
{
    @Autowired
    private PointAlarmHistoryMapper pointAlarmHistoryMapper;

    /**
     * 查询监测点位历史告警信息
     * 
     * @param id 监测点位历史告警信息主键
     * @return 监测点位历史告警信息
     */
    @Override
    public PointAlarmHistory selectPointAlarmHistoryById(String id)
    {
        return pointAlarmHistoryMapper.selectPointAlarmHistoryById(id);
    }

    /**
     * 查询监测点位历史告警信息列表
     * 
     * @param pointAlarmHistory 监测点位历史告警信息
     * @return 监测点位历史告警信息
     */
    @Override
    public List<PointAlarmHistory> selectPointAlarmHistoryList(PointAlarmHistory pointAlarmHistory)
    {
        return pointAlarmHistoryMapper.selectPointAlarmHistoryList(pointAlarmHistory);
    }

    /**
     * 新增监测点位历史告警信息
     * 
     * @param pointAlarmHistory 监测点位历史告警信息
     * @return 结果
     */
    @Override
    public int insertPointAlarmHistory(PointAlarmHistory pointAlarmHistory)
    {
        pointAlarmHistory.setCreateTime(DateUtils.getNowDate());
        return pointAlarmHistoryMapper.insertPointAlarmHistory(pointAlarmHistory);
    }

    /**
     * 修改监测点位历史告警信息
     * 
     * @param pointAlarmHistory 监测点位历史告警信息
     * @return 结果
     */
    @Override
    public int updatePointAlarmHistory(PointAlarmHistory pointAlarmHistory)
    {
        pointAlarmHistory.setUpdateTime(DateUtils.getNowDate());
        return pointAlarmHistoryMapper.updatePointAlarmHistory(pointAlarmHistory);
    }

    /**
     * 批量删除监测点位历史告警信息
     * 
     * @param ids 需要删除的监测点位历史告警信息主键
     * @return 结果
     */
    @Override
    public int deletePointAlarmHistoryByIds(String[] ids)
    {
        return pointAlarmHistoryMapper.deletePointAlarmHistoryByIds(ids);
    }

    /**
     * 删除监测点位历史告警信息信息
     * 
     * @param id 监测点位历史告警信息主键
     * @return 结果
     */
    @Override
    public int deletePointAlarmHistoryById(String id)
    {
        return pointAlarmHistoryMapper.deletePointAlarmHistoryById(id);
    }
}
